import request from '@/api/request'

//添加品牌
 function addBrand(data) {
  return request({
    url: '/lejuAdmin/brand/addBrand',
    method: 'POST',
    data
  })
}
//删除品牌
function delBrand(id,data) {
    return request({
      url:`/lejuAdmin/brand/delBrand/${id}`,
      method: 'DELETE',
      data
    })
  }
  //品牌列表
  function findAllBrand(data) {
    return request({
      url: '/lejuAdmin/brand/findAllBrand',
      method: 'GET',
      data
    })
  }
  //品牌列表分页
  function findBrandByPage(start,limit,data) {
    return request({
      url:`/lejuAdmin/brand/findBrandByPage/${start}/${limit}`,
      method: 'GET',
      data
    })
  }
  //显示隐藏
  function switchShowStatus(data) {
    return request({
      url: '/lejuAdmin/brand/switchShowStatus',
      method: 'POST',
      data
    })
  }
  //更新品牌
  function updateBrand(data) {
    return request({
      url: '/lejuAdmin/brand/updateBrand',
      method: 'POST',
      data
    })
  }
export default{
    addBrand,delBrand,findAllBrand,findBrandByPage,
    switchShowStatus,updateBrand
}
